import request from '@/utils/request'

// 查询仪器列表
export function listInstrumentation(query) {
  return request({
    url: '/labbase/instrumentation/list',
    method: 'get',
    params: query
  })
}

// 查询仪器详细
export function getInstrumentation(instrumentationId) {
  return request({
    url: '/labbase/instrumentation/' + instrumentationId,
    method: 'get'
  })
}
///byno/{assetNo}
export function getByNo(assetNo) {
  return request({
    url: '/labbase/instrumentation/byno/' + assetNo,
    method: 'get'
  })
}
// 新增仪器
export function addInstrumentation(data) {
  return request({
    url: '/labbase/instrumentation',
    method: 'post',
    data: data
  })
}

// 修改仪器
export function updateInstrumentation(data) {
  return request({
    url: '/labbase/instrumentation',
    method: 'put',
    data: data
  })
}

// 删除仪器
export function delInstrumentation(instrumentationId) {
  return request({
    url: '/labbase/instrumentation/' + instrumentationId,
    method: 'delete'
  })
}

// 导出仪器
export function exportInstrumentation(query) {
  return request({
    url: '/labbase/instrumentation/export',
    method: 'get',
    params: query
  })
}